<!DOCTYPE html>

<html lang="en" data-content_root="./">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />

    <title>timsconvert package &#8212; TIMSCONVERT 2.0.0 documentation</title>
    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
    <link rel="stylesheet" type="text/css" href="_static/basic.css?v=c058f7c8" />
    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=27fed22d" />
    <script src="_static/documentation_options.js?v=51b770b3"></script>
    <script src="_static/doctools.js?v=9a2dae69"></script>
    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="timsconvert" href="modules.html" />
    <link rel="prev" title="Advanced Usage" href="advanced.html" />
   
  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
  

  
  

  </head><body>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          

          <div class="body" role="main">
            
  <section id="timsconvert-package">
<h1>timsconvert package<a class="headerlink" href="#timsconvert-package" title="Link to this heading">¶</a></h1>
<section id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Link to this heading">¶</a></h2>
</section>
<section id="module-timsconvert.arguments">
<span id="timsconvert-arguments-module"></span><h2>timsconvert.arguments module<a class="headerlink" href="#module-timsconvert.arguments" title="Link to this heading">¶</a></h2>
<dl class="py function">
<dt class="sig sig-object py" id="timsconvert.arguments.args_check">
<span class="sig-prename descclassname"><span class="pre">timsconvert.arguments.</span></span><span class="sig-name descname"><span class="pre">args_check</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">args</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.arguments.args_check" title="Link to this definition">¶</a></dt>
<dd><p>Check relevant arguments to ensure user input values are valid.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>args</strong> (<em>dict</em>) – Arguments obtained from timsconvert.arguments.get_args().</p>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="timsconvert.arguments.get_args">
<span class="sig-prename descclassname"><span class="pre">timsconvert.arguments.</span></span><span class="sig-name descname"><span class="pre">get_args</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.arguments.get_args" title="Link to this definition">¶</a></dt>
<dd><p>Parse command line parameters, including required, optional, and system parameters.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>server</strong> (<em>bool</em>) – If enabled, allows the user to specify a custom url using the “–url” parameter, defaults to False</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Arguments with default or user specified values.</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>dict</p>
</dd>
</dl>
</dd></dl>

</section>
<section id="module-timsconvert.classes">
<span id="timsconvert-classes-module"></span><h2>timsconvert.classes module<a class="headerlink" href="#module-timsconvert.classes" title="Link to this heading">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="timsconvert.classes.TimsconvertBafData">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">timsconvert.classes.</span></span><span class="sig-name descname"><span class="pre">TimsconvertBafData</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">bruker_d_folder_name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">baf2sql</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">raw_calibration</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">all_variables</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.classes.TimsconvertBafData" title="Link to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">BafData</span></code></p>
<p>Child class of pyBaf2Sql.classes.BafData containing metadata from BAF files and methods from Baf2sql library to
work with BAF format data.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>bruker_d_folder_name</strong> (<em>str</em>) – Path to Bruker .d directory containing analysis.baf and analysis.sqlite.</p></li>
<li><p><strong>baf2sql</strong> (<em>ctypes.CDLL</em>) – Library initialized by pyBaf2Sql.init_baf2sql.init_baf2sql_api().</p></li>
<li><p><strong>raw_calibration</strong> (<em>bool</em>) – Whether to use recalibrated data (False) or not (True), defaults to False.</p></li>
<li><p><strong>all_variables</strong> (<em>bool</em>) – Whether to load all variables from analysis.sqlite database, defaults to True.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="timsconvert.classes.TimsconvertBafData.subset_ms1_frames">
<span class="sig-name descname"><span class="pre">subset_ms1_frames</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.classes.TimsconvertBafData.subset_ms1_frames" title="Link to this definition">¶</a></dt>
<dd><p>Subset timsconvert.classes.BafData.frames table (Spectra table from analysis.sqlite) to only include MS1 rows.
Used during the subsetting process during data parsing/writing for memory efficiency. The subset
pandas.DataFrame is stored in timsconvert.classes.TimsconvertBafData.ms1_frames.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="timsconvert.classes.TimsconvertTdfData">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">timsconvert.classes.</span></span><span class="sig-name descname"><span class="pre">TimsconvertTdfData</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">bruker_d_folder_name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">tdf_sdk</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">use_recalibrated_state</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pressure_compensation_strategy</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">PressureCompensationStrategy.NoPressureCompensation</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.classes.TimsconvertTdfData" title="Link to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">TdfData</span></code></p>
<p>Child class of pyTDFSDK.classes.TdfData containing metadata from TDF files and methods from TDF-SDK library to work
with TDF format data.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>bruker_d_folder_name</strong> (<em>str</em>) – Path to a Bruker .d directory containing analysis.tdf.</p></li>
<li><p><strong>tdf_sdk</strong> (<em>ctypes.CDLL</em>) – Library initialized by pyTDFSDK.init_tdf_sdk.init_tdf_sdk_api().</p></li>
<li><p><strong>use_recalibrated_state</strong> (<em>bool</em>) – Whether to use recalibrated data (True) or not (False), defaults to True.</p></li>
<li><p><strong>pressure_compensation_strategy</strong> (<em>enum.Enum</em>) – Pressure compensation when opening TDF data
(pyTDFSDK.ctypes_data_structures.PressureCompensationStrategy.NoPressureCompensation = None,
pyTDFSDK.ctypes_data_structures.PressureCompensationStrategy.AnalyisGlobalPressureCompensation = analysis
global pressure compensation,
pyTDFSDK.ctypes_data_structures.PressureCompensationStrategy.PerFramePressureCompensation = per frame pressure
compensation), defaults to No Pressure Compensation.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="timsconvert.classes.TimsconvertTdfData.subset_ms1_frames">
<span class="sig-name descname"><span class="pre">subset_ms1_frames</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.classes.TimsconvertTdfData.subset_ms1_frames" title="Link to this definition">¶</a></dt>
<dd><p>Subset timsconvert.classes.TdfData.frames table (Frames table from analysis.tdf) to only include MS1 rows.
Used during the subsetting process during data parsing/writing for memory efficiency. The subset
pandas.DataFrame is stored in timsconvert.classes.TimsconvertTdfData.ms1_frames.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="timsconvert.classes.TimsconvertTsfData">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">timsconvert.classes.</span></span><span class="sig-name descname"><span class="pre">TimsconvertTsfData</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">bruker_d_folder_name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">tdf_sdk</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">use_recalibrated_state</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.classes.TimsconvertTsfData" title="Link to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">TsfData</span></code></p>
<p>Child class of pyTDFSDK.classes.TsfData containing metadata from TSF files and methods from TDF-SDK library to work
with TSF format data.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>bruker_d_folder_name</strong> (<em>str</em>) – Path to a Bruker .d directory containing analysis.tsf.</p></li>
<li><p><strong>tdf_sdk</strong> (<em>ctypes.CDLL</em>) – Library initialized by pyTDFSDK.init_tdf_sdk.init_tdf_sdk_api().</p></li>
<li><p><strong>use_recalibrated_state</strong> (<em>bool</em>) – Whether to use recalibrated data (True) or not (False), defaults to True.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="timsconvert.classes.TimsconvertTsfData.subset_ms1_frames">
<span class="sig-name descname"><span class="pre">subset_ms1_frames</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.classes.TimsconvertTsfData.subset_ms1_frames" title="Link to this definition">¶</a></dt>
<dd><p>Subset timsconvert.classes.TsfData.frames table (Frames table from analysis.tsf) to only include MS1 rows.
Used during the subsetting process during data parsing/writing for memory efficiency. The subset
pandas.DataFrame is stored in timsconvert.classes.TimsconvertTsfData.ms1_frames.</p>
</dd></dl>

</dd></dl>

</section>
<section id="module-timsconvert.constants">
<span id="timsconvert-constants-module"></span><h2>timsconvert.constants module<a class="headerlink" href="#module-timsconvert.constants" title="Link to this heading">¶</a></h2>
</section>
<section id="module-timsconvert.convert">
<span id="timsconvert-convert-module"></span><h2>timsconvert.convert module<a class="headerlink" href="#module-timsconvert.convert" title="Link to this heading">¶</a></h2>
<dl class="py function">
<dt class="sig sig-object py" id="timsconvert.convert.clean_up_logfiles">
<span class="sig-prename descclassname"><span class="pre">timsconvert.convert.</span></span><span class="sig-name descname"><span class="pre">clean_up_logfiles</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">list_of_logfiles</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.convert.clean_up_logfiles" title="Link to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="timsconvert.convert.convert_raw_file">
<span class="sig-prename descclassname"><span class="pre">timsconvert.convert.</span></span><span class="sig-name descname"><span class="pre">convert_raw_file</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tuple_args</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.convert.convert_raw_file" title="Link to this definition">¶</a></dt>
<dd></dd></dl>

</section>
<section id="module-timsconvert.data_input">
<span id="timsconvert-data-input-module"></span><h2>timsconvert.data_input module<a class="headerlink" href="#module-timsconvert.data_input" title="Link to this heading">¶</a></h2>
<dl class="py function">
<dt class="sig sig-object py" id="timsconvert.data_input.check_for_multiple_analysis">
<span class="sig-prename descclassname"><span class="pre">timsconvert.data_input.</span></span><span class="sig-name descname"><span class="pre">check_for_multiple_analysis</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">bruker_dot_d_file</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.data_input.check_for_multiple_analysis" title="Link to this definition">¶</a></dt>
<dd><p>Check to ensure that only a single .baf/.tsf/.tdf and associated .tsf_bin/.tdf_bin exists within the .d directory.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>bruker_dot_d_file</strong> – Path to the .d directory of interest.</p>
</dd>
<dt class="field-even">Type<span class="colon">:</span></dt>
<dd class="field-even"><p>str</p>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="timsconvert.data_input.dot_d_detection">
<span class="sig-prename descclassname"><span class="pre">timsconvert.data_input.</span></span><span class="sig-name descname"><span class="pre">dot_d_detection</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">input_directory</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.data_input.dot_d_detection" title="Link to this definition">¶</a></dt>
<dd><p>Search the input directory and any subdirectories for .d directory paths.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>input_directory</strong> – Path to the directory to be searched.</p>
</dd>
<dt class="field-even">Type<span class="colon">:</span></dt>
<dd class="field-even"><p>str</p>
</dd>
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>List of absolute paths for each .d directory found.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>list</p>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="timsconvert.data_input.schema_detection">
<span class="sig-prename descclassname"><span class="pre">timsconvert.data_input.</span></span><span class="sig-name descname"><span class="pre">schema_detection</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">bruker_dot_d_file</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.data_input.schema_detection" title="Link to this definition">¶</a></dt>
<dd><p>Detect the schema used by the raw data in the Bruker .d directory.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>bruker_dot_d_file</strong> – Path to the .d directory of interest.</p>
</dd>
<dt class="field-even">Type<span class="colon">:</span></dt>
<dd class="field-even"><p>str</p>
</dd>
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>Capitalized schema extension (TDF, TSF, or BAF).</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>str</p>
</dd>
</dl>
</dd></dl>

</section>
<section id="module-timsconvert.parse">
<span id="timsconvert-parse-module"></span><h2>timsconvert.parse module<a class="headerlink" href="#module-timsconvert.parse" title="Link to this heading">¶</a></h2>
<dl class="py function">
<dt class="sig sig-object py" id="timsconvert.parse.parse_lcms_baf">
<span class="sig-prename descclassname"><span class="pre">timsconvert.parse.</span></span><span class="sig-name descname"><span class="pre">parse_lcms_baf</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">baf_data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">frame_start</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">frame_stop</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mode</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ms2_only</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">profile_bins</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mz_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">intensity_encoding</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.parse.parse_lcms_baf" title="Link to this definition">¶</a></dt>
<dd><p>Parse group of frames from LC-MS(/MS) data from Bruker BAF files acquired in MS1 only, Auto MS/MS, MRM MS/MS, isCID
MS/MS, or bbCID MS/MS mode in otofControl.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>baf_data</strong> (<a class="reference internal" href="#timsconvert.classes.TimsconvertBafData" title="timsconvert.classes.TimsconvertBafData"><em>timsconvert.classes.TimsconvertBafData</em></a>) – baf_data object containing metadata from analysis.sqlite database.</p></li>
<li><p><strong>frame_start</strong> (<em>int</em>) – Beginning frame number.</p></li>
<li><p><strong>frame_stop</strong> (<em>int</em>) – Ending frame number (non-inclusive).</p></li>
<li><p><strong>mode</strong> (<em>str</em>) – Mode command line parameter, either “profile”, “centroid”, or “raw”.</p></li>
<li><p><strong>ms2_only</strong> (<em>bool</em>) – Whether to include MS1 data in the output files.</p></li>
<li><p><strong>profile_bins</strong> (<em>int</em>) – Number of bins to bin spectrum to.</p></li>
<li><p><strong>mz_encoding</strong> (<em>int</em>) – m/z encoding command line parameter, either “64” or “32”.</p></li>
<li><p><strong>intensity_encoding</strong> (<em>int</em>) – Intensity encoding command line parameter, either “64” or “32”.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Tuple of (list of dictionaries containing MS1 spectrum data, list of dictionaries containing MS/MS
spectrum data).</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>tuple[list[pyBaf2Sql.classes.BafSpectrum]]</p>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="timsconvert.parse.parse_lcms_tdf">
<span class="sig-prename descclassname"><span class="pre">timsconvert.parse.</span></span><span class="sig-name descname"><span class="pre">parse_lcms_tdf</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tdf_data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">frame_start</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">frame_stop</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mode</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ms2_only</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">exclude_mobility</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">profile_bins</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mz_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">intensity_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mobility_encoding</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.parse.parse_lcms_tdf" title="Link to this definition">¶</a></dt>
<dd><p>Parse group of frames from LC-MS(/MS) data from Bruker TDF files acquired in MS1 only, ddaPASEF MS/MS, diaPASEF
MS/MS, bbCID MS/MS, MRM MS/MS, or prmPASEF MS/MS mode in timsControl.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>tdf_data</strong> (<a class="reference internal" href="#timsconvert.classes.TimsconvertTdfData" title="timsconvert.classes.TimsconvertTdfData"><em>timsconvert.classes.TimsconvertTdfData</em></a>) – tdf_data object containing metadata from analysis.tdf database.</p></li>
<li><p><strong>frame_start</strong> (<em>int</em>) – Beginning frame number.</p></li>
<li><p><strong>frame_stop</strong> (<em>int</em>) – Ending frame number (non-inclusive).</p></li>
<li><p><strong>mode</strong> (<em>str</em>) – Mode command line parameter, either “profile”, “centroid”, or “raw”.</p></li>
<li><p><strong>ms2_only</strong> (<em>bool</em>) – Whether to include MS1 data in the output files.</p></li>
<li><p><strong>exclude_mobility</strong> (<em>bool</em><em> | </em><em>None</em>) – Whether to include mobility data in the output files, defaults to None.</p></li>
<li><p><strong>profile_bins</strong> (<em>int</em>) – Number of bins to bin spectrum to.</p></li>
<li><p><strong>mz_encoding</strong> (<em>int</em>) – m/z encoding command line parameter, either “64” or “32”.</p></li>
<li><p><strong>intensity_encoding</strong> (<em>int</em>) – Intensity encoding command line parameter, either “64” or “32”.</p></li>
<li><p><strong>mobility_encoding</strong> (<em>int</em>) – Mobility encoding command line parameter, either “64” or “32”.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Tuple of (list of dictionaries containing MS1 spectrum data, list of dictionaries containing MS/MS
spectrum data).</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>tuple[list[pyTDFSDK.classes.TdfSpectrum]]</p>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="timsconvert.parse.parse_lcms_tsf">
<span class="sig-prename descclassname"><span class="pre">timsconvert.parse.</span></span><span class="sig-name descname"><span class="pre">parse_lcms_tsf</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tsf_data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">frame_start</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">frame_stop</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mode</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ms2_only</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">profile_bins</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mz_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">intensity_encoding</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.parse.parse_lcms_tsf" title="Link to this definition">¶</a></dt>
<dd><p>Parse group of frames from LC-MS(/MS) data from Bruker TSF files acquired in Auto MS/MS mode MS1 only, Auto MS/MS,
MRM MS/MS, or bbCID MS/MS mode in timsControl.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>tsf_data</strong> (<a class="reference internal" href="#timsconvert.classes.TimsconvertTsfData" title="timsconvert.classes.TimsconvertTsfData"><em>timsconvert.classes.TimsconvertTsfData</em></a>) – tsf_data object containing metadata from analysis.tsf database.</p></li>
<li><p><strong>frame_start</strong> (<em>int</em>) – Beginning frame number.</p></li>
<li><p><strong>frame_stop</strong> (<em>int</em>) – Ending frame number (non-inclusive).</p></li>
<li><p><strong>mode</strong> (<em>str</em>) – Mode command line parameter, either “profile”, “centroid”, or “raw”.</p></li>
<li><p><strong>ms2_only</strong> (<em>bool</em>) – Whether to include MS1 data in the output files.</p></li>
<li><p><strong>profile_bins</strong> (<em>int</em>) – Number of bins to bin spectrum to.</p></li>
<li><p><strong>mz_encoding</strong> (<em>int</em>) – m/z encoding command line parameter, either “64” or “32”.</p></li>
<li><p><strong>intensity_encoding</strong> (<em>int</em>) – Intensity encoding command line parameter, either “64” or “32”.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Tuple of (list of dictionaries containing MS1 spectrum data, list of dictionaries containing MS/MS
spectrum data).</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>tuple[list[pyTDFSDK.classes.TsfSpectrum]]</p>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="timsconvert.parse.parse_maldi_plate_map">
<span class="sig-prename descclassname"><span class="pre">timsconvert.parse.</span></span><span class="sig-name descname"><span class="pre">parse_maldi_plate_map</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">plate_map_filename</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.parse.parse_maldi_plate_map" title="Link to this definition">¶</a></dt>
<dd><p>Parse a MALDI plate map from a CSV file without a column header or row index.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>plate_map_filename</strong> (<em>str</em>) – Path to the MALDI plate map in CSV format.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Dictionary containing standard MTP spot names as the key and spot label/category/condition as the value.</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>dict</p>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="timsconvert.parse.parse_maldi_tdf">
<span class="sig-prename descclassname"><span class="pre">timsconvert.parse.</span></span><span class="sig-name descname"><span class="pre">parse_maldi_tdf</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tdf_data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">frame_start</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">frame_stop</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mode</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ms2_only</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">exclude_mobility</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">profile_bins</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mz_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">intensity_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mobility_encoding</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.parse.parse_maldi_tdf" title="Link to this definition">¶</a></dt>
<dd><p>Parse group of frames from MALDI-MS(/MS) data from Bruker TDF files acquired in MS1 only, MS/MS, bbCID MS/MS, or
prmPASEF mode in timsControl.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>tdf_data</strong> (<a class="reference internal" href="#timsconvert.classes.TimsconvertTdfData" title="timsconvert.classes.TimsconvertTdfData"><em>timsconvert.classes.TimsconvertTdfData</em></a>) – tdf_data object containing metadata from analysis.tdf database.</p></li>
<li><p><strong>frame_start</strong> (<em>int</em>) – Beginning frame number.</p></li>
<li><p><strong>frame_stop</strong> (<em>int</em>) – Ending frame number (non-inclusive).</p></li>
<li><p><strong>mode</strong> (<em>str</em>) – Mode command line parameter, either “profile”, “centroid”, or “raw”.</p></li>
<li><p><strong>ms2_only</strong> (<em>bool</em>) – Whether to include MS1 data in the output files.</p></li>
<li><p><strong>exclude_mobility</strong> (<em>bool</em><em> | </em><em>None</em>) – Whether to include mobility data in the output files, defaults to None.</p></li>
<li><p><strong>profile_bins</strong> (<em>int</em>) – Number of bins to bin spectrum to.</p></li>
<li><p><strong>mz_encoding</strong> (<em>int</em>) – m/z encoding command line parameter, either “64” or “32”.</p></li>
<li><p><strong>intensity_encoding</strong> (<em>int</em>) – Intensity encoding command line parameter, either “64” or “32”.</p></li>
<li><p><strong>mobility_encoding</strong> (<em>int</em>) – Mobility encoding command line parameter, either “64” or “32”.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>List of dictionaries containing spectrum data.</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>list[pyTDFSDK.classes.TdfSpectrum]</p>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="timsconvert.parse.parse_maldi_tdf_iprm">
<span class="sig-prename descclassname"><span class="pre">timsconvert.parse.</span></span><span class="sig-name descname"><span class="pre">parse_maldi_tdf_iprm</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tdf_data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">frame_start</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">frame_stop</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mode</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ms2_only</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">exclude_mobility</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">profile_bins</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mz_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">intensity_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mobility_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">diapasef_window</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.parse.parse_maldi_tdf_iprm" title="Link to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="timsconvert.parse.parse_maldi_tsf">
<span class="sig-prename descclassname"><span class="pre">timsconvert.parse.</span></span><span class="sig-name descname"><span class="pre">parse_maldi_tsf</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tsf_data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">frame_start</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">frame_stop</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mode</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ms2_only</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">profile_bins</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mz_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">intensity_encoding</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.parse.parse_maldi_tsf" title="Link to this definition">¶</a></dt>
<dd><p>Parse group of frames from MALDI-MS(/MS) data from Bruker TSF files acquired in MS1 only, MS/MS, or bbCID MS/MS
mode in timsControl.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>tsf_data</strong> (<a class="reference internal" href="#timsconvert.classes.TimsconvertTsfData" title="timsconvert.classes.TimsconvertTsfData"><em>timsconvert.classes.TimsconvertTsfData</em></a>) – tsf_data object containing metadata from analysis.tsf database.</p></li>
<li><p><strong>frame_start</strong> (<em>int</em>) – Beginning frame number.</p></li>
<li><p><strong>frame_stop</strong> (<em>int</em>) – Ending frame number (non-inclusive).</p></li>
<li><p><strong>mode</strong> (<em>str</em>) – Mode command line parameter, either “profile”, “centroid”, or “raw”.</p></li>
<li><p><strong>ms2_only</strong> (<em>bool</em>) – Whether to include MS1 data in the output files.</p></li>
<li><p><strong>profile_bins</strong> (<em>int</em>) – Number of bins to bin spectrum to.</p></li>
<li><p><strong>mz_encoding</strong> (<em>int</em>) – m/z encoding command line parameter, either “64” or “32”.</p></li>
<li><p><strong>intensity_encoding</strong> (<em>int</em>) – Intensity encoding command line parameter, either “64” or “32”.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>List of dictionaries containing spectrum data.</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>list[pyTDFSDK.classes.TsfSpectrum]</p>
</dd>
</dl>
</dd></dl>

</section>
<section id="module-timsconvert.timestamp">
<span id="timsconvert-timestamp-module"></span><h2>timsconvert.timestamp module<a class="headerlink" href="#module-timsconvert.timestamp" title="Link to this heading">¶</a></h2>
<dl class="py function">
<dt class="sig sig-object py" id="timsconvert.timestamp.get_iso8601_timestamp">
<span class="sig-prename descclassname"><span class="pre">timsconvert.timestamp.</span></span><span class="sig-name descname"><span class="pre">get_iso8601_timestamp</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.timestamp.get_iso8601_timestamp" title="Link to this definition">¶</a></dt>
<dd><p>Get timestamp in ISO 8601 format.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>ISO 8601 format timestamp.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>str</p>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="timsconvert.timestamp.get_timestamp">
<span class="sig-prename descclassname"><span class="pre">timsconvert.timestamp.</span></span><span class="sig-name descname"><span class="pre">get_timestamp</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.timestamp.get_timestamp" title="Link to this definition">¶</a></dt>
<dd><p>Get timestamp in non-standard format that is compatible with Windows file system.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>Timestamp.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>str</p>
</dd>
</dl>
</dd></dl>

</section>
<section id="module-timsconvert.timsconvert_gui_template">
<span id="timsconvert-timsconvert-gui-template-module"></span><h2>timsconvert.timsconvert_gui_template module<a class="headerlink" href="#module-timsconvert.timsconvert_gui_template" title="Link to this heading">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="timsconvert.timsconvert_gui_template.Ui_TimsconvertGuiWindow">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">timsconvert.timsconvert_gui_template.</span></span><span class="sig-name descname"><span class="pre">Ui_TimsconvertGuiWindow</span></span><a class="headerlink" href="#timsconvert.timsconvert_gui_template.Ui_TimsconvertGuiWindow" title="Link to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<dl class="py method">
<dt class="sig sig-object py" id="timsconvert.timsconvert_gui_template.Ui_TimsconvertGuiWindow.populate_table">
<span class="sig-name descname"><span class="pre">populate_table</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.timsconvert_gui_template.Ui_TimsconvertGuiWindow.populate_table" title="Link to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="timsconvert.timsconvert_gui_template.Ui_TimsconvertGuiWindow.retranslateUi">
<span class="sig-name descname"><span class="pre">retranslateUi</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">TimsconvertGuiWindow</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.timsconvert_gui_template.Ui_TimsconvertGuiWindow.retranslateUi" title="Link to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="timsconvert.timsconvert_gui_template.Ui_TimsconvertGuiWindow.setupUi">
<span class="sig-name descname"><span class="pre">setupUi</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">TimsconvertGuiWindow</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.timsconvert_gui_template.Ui_TimsconvertGuiWindow.setupUi" title="Link to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

</section>
<section id="module-timsconvert.write">
<span id="timsconvert-write-module"></span><h2>timsconvert.write module<a class="headerlink" href="#module-timsconvert.write" title="Link to this heading">¶</a></h2>
<dl class="py function">
<dt class="sig sig-object py" id="timsconvert.write.get_spectra_count">
<span class="sig-prename descclassname"><span class="pre">timsconvert.write.</span></span><span class="sig-name descname"><span class="pre">get_spectra_count</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.write.get_spectra_count" title="Link to this definition">¶</a></dt>
<dd><p>Calculate the predicted number of spectra to be written.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>data</strong> (<a class="reference internal" href="#timsconvert.classes.TimsconvertTdfData" title="timsconvert.classes.TimsconvertTdfData"><em>timsconvert.classes.TimsconvertTdfData</em></a><em> | </em><a class="reference internal" href="#timsconvert.classes.TimsconvertTsfData" title="timsconvert.classes.TimsconvertTsfData"><em>timsconvert.classes.TimsconvertTsfData</em></a><em> |
</em><a class="reference internal" href="#timsconvert.classes.TimsconvertBafData" title="timsconvert.classes.TimsconvertBafData"><em>timsconvert.classes.TimsconvertBafData</em></a>) – Object containing raw data information from TDF, TSF, or BAF file.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Number of expected spectra.</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>int</p>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="timsconvert.write.update_spectra_count">
<span class="sig-prename descclassname"><span class="pre">timsconvert.write.</span></span><span class="sig-name descname"><span class="pre">update_spectra_count</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">outdir</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">outfile</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">num_of_spectra</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">scan_count</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.write.update_spectra_count" title="Link to this definition">¶</a></dt>
<dd><p>Calculate the actual number of spectra that were written to the output mzML file. Update is needed to prevent
counting emtpy spectra that were omitted from the output. Performs this by iterating over tmp mzML file that was
written and replacing the tmp file with a final mzML file with a true spectra count.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>outdir</strong> (<em>str</em>) – Output directory path that was specified from the command line parameters or the original input
file path if no output directory was specified.</p></li>
<li><p><strong>outfile</strong> (<em>str</em>) – The original input filename if no output filename was specified.</p></li>
<li><p><strong>num_of_spectra</strong> (<em>int</em>) – Number of spectra that was calculated for the current file being converted using
timsconvert.write.get_spectra_count().</p></li>
<li><p><strong>scan_count</strong> (<em>int</em>) – Final true count for the number of spectra from the current file being converted.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="timsconvert.write.write_lcms_chunk_to_mzml">
<span class="sig-prename descclassname"><span class="pre">timsconvert.write.</span></span><span class="sig-name descname"><span class="pre">write_lcms_chunk_to_mzml</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">writer</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">frame_start</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">frame_stop</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">scan_count</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mode</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ms2_only</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">exclude_mobility</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">profile_bins</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mz_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">intensity_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mobility_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">compression</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.write.write_lcms_chunk_to_mzml" title="Link to this definition">¶</a></dt>
<dd><p>Parse and write out a group of spectra to an mzML file from an LC-MS(/MS) dataset using psims.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>data</strong> (<a class="reference internal" href="#timsconvert.classes.TimsconvertTdfData" title="timsconvert.classes.TimsconvertTdfData"><em>timsconvert.classes.TimsconvertTdfData</em></a><em> | </em><a class="reference internal" href="#timsconvert.classes.TimsconvertTsfData" title="timsconvert.classes.TimsconvertTsfData"><em>timsconvert.classes.TimsconvertTsfData</em></a><em> |
</em><a class="reference internal" href="#timsconvert.classes.TimsconvertBafData" title="timsconvert.classes.TimsconvertBafData"><em>timsconvert.classes.TimsconvertBafData</em></a>) – Object containing raw data information from TDF, TSF, or BAF file.</p></li>
<li><p><strong>writer</strong> (<em>psims.mzml.MzMLWriter</em>) – Instance of psims.mzml.MzMLWriter for output file.</p></li>
<li><p><strong>frame_start</strong> (<em>int</em>) – Beginning frame number.</p></li>
<li><p><strong>frame_stop</strong> (<em>int</em>) – Ending frame number (non-inclusive).</p></li>
<li><p><strong>scan_count</strong> (<em>int</em>) – Current count for the number of spectra from the current file that have been converted.</p></li>
<li><p><strong>mode</strong> (<em>str</em>) – Mode command line parameter, either “profile”, “centroid”, or “raw”.</p></li>
<li><p><strong>ms2_only</strong> (<em>bool</em>) – Whether to include MS1 data in the output files.</p></li>
<li><p><strong>exclude_mobility</strong> (<em>bool</em>) – Whether to include mobility data in the output files, defaults to None.</p></li>
<li><p><strong>profile_bins</strong> (<em>int</em>) – Number of bins to bin spectrum to.</p></li>
<li><p><strong>mz_encoding</strong> (<em>int</em>) – m/z encoding command line parameter, either “64” or “32”.</p></li>
<li><p><strong>intensity_encoding</strong> (<em>int</em>) – Intensity encoding command line parameter, either “64” or “32”.</p></li>
<li><p><strong>mobility_encoding</strong> (<em>int</em>) – Mobility encoding command line parameter, either “64” or “32”.</p></li>
<li><p><strong>compression</strong> (<em>str</em>) – Compression command line parameter, either “zlib” or “none”.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Updated count for the number of spectra from the current file that have been converted.</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>int</p>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="timsconvert.write.write_lcms_mzml">
<span class="sig-prename descclassname"><span class="pre">timsconvert.write.</span></span><span class="sig-name descname"><span class="pre">write_lcms_mzml</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">infile</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">outdir</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">outfile</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mode</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ms2_only</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">exclude_mobility</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">profile_bins</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mz_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">intensity_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mobility_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">compression</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">barebones_metadata</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">chunk_size</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">10</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.write.write_lcms_mzml" title="Link to this definition">¶</a></dt>
<dd><p>Parse and write out spectra to an mzML file from an LC-MS(/MS) dataset using psims.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>data</strong> (<a class="reference internal" href="#timsconvert.classes.TimsconvertTdfData" title="timsconvert.classes.TimsconvertTdfData"><em>timsconvert.classes.TimsconvertTdfData</em></a><em> | </em><a class="reference internal" href="#timsconvert.classes.TimsconvertTsfData" title="timsconvert.classes.TimsconvertTsfData"><em>timsconvert.classes.TimsconvertTsfData</em></a><em> |
</em><a class="reference internal" href="#timsconvert.classes.TimsconvertBafData" title="timsconvert.classes.TimsconvertBafData"><em>timsconvert.classes.TimsconvertBafData</em></a>) – Object containing raw data information from TDF, TSF, or BAF file.</p></li>
<li><p><strong>infile</strong> (<em>str</em>) – Input file path to be used for source file metadata.</p></li>
<li><p><strong>outdir</strong> (<em>str</em>) – Output directory path that was specified from the command line parameters or the original input
file path if no output directory was specified.</p></li>
<li><p><strong>outfile</strong> (<em>str</em>) – The original input filename if no output filename was specified.</p></li>
<li><p><strong>mode</strong> (<em>str</em>) – Mode command line parameter, either “profile”, “centroid”, or “raw”.</p></li>
<li><p><strong>ms2_only</strong> (<em>bool</em>) – Whether to include MS1 data in the output files.</p></li>
<li><p><strong>exclude_mobility</strong> (<em>bool</em>) – Whether to include mobility data in the output files, defaults to None.</p></li>
<li><p><strong>profile_bins</strong> (<em>int</em>) – Number of bins to bin spectrum to.</p></li>
<li><p><strong>mz_encoding</strong> (<em>int</em>) – m/z encoding command line parameter, either “64” or “32”.</p></li>
<li><p><strong>intensity_encoding</strong> (<em>int</em>) – Intensity encoding command line parameter, either “64” or “32”.</p></li>
<li><p><strong>mobility_encoding</strong> (<em>int</em>) – Mobility encoding command line parameter, either “64” or “32”.</p></li>
<li><p><strong>compression</strong> (<em>str</em>) – Compression command line parameter, either “zlib” or “none”.</p></li>
<li><p><strong>barebones_metadata</strong> (<em>bool</em>) – If True, omit software and data processing metadata in the resulting mzML files. Used
for compatibility with downstream analysis software that does not have support for newer CV params or
UserParams.</p></li>
<li><p><strong>chunk_size</strong> (<em>int</em>) – Number of MS1 spectra that to be used when subsetting dataset into smaller groups to pass onto
timsconvert.write.write_lcms_chunk_to_mzml() for memory efficiency; larger chunk_size requires more memory
during conversion.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="timsconvert.write.write_maldi_dd_mzml">
<span class="sig-prename descclassname"><span class="pre">timsconvert.write.</span></span><span class="sig-name descname"><span class="pre">write_maldi_dd_mzml</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">infile</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">outdir</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">outfile</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mode</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ms2_only</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">exclude_mobility</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">profile_bins</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mz_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">intensity_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mobility_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">compression</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">maldi_output_file</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">plate_map</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">barebones_metadata</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.write.write_maldi_dd_mzml" title="Link to this definition">¶</a></dt>
<dd><p>Parse and write out spectra to an mzML file from a MALDI-MS(/MS) dried droplet dataset using psims.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>data</strong> (<a class="reference internal" href="#timsconvert.classes.TimsconvertTdfData" title="timsconvert.classes.TimsconvertTdfData"><em>timsconvert.classes.TimsconvertTdfData</em></a><em> | </em><a class="reference internal" href="#timsconvert.classes.TimsconvertTsfData" title="timsconvert.classes.TimsconvertTsfData"><em>timsconvert.classes.TimsconvertTsfData</em></a>) – Object containing raw data information from TDF or TSF file.</p></li>
<li><p><strong>infile</strong> (<em>str</em>) – Input file path to be used for source file metadata.</p></li>
<li><p><strong>outdir</strong> (<em>str</em>) – Output directory path that was specified from the command line parameters or the original input
file path if no output directory was specified.</p></li>
<li><p><strong>outfile</strong> (<em>str</em>) – The original input filename if no output filename was specified.</p></li>
<li><p><strong>mode</strong> (<em>str</em>) – Mode command line parameter, either “profile”, “centroid”, or “raw”.</p></li>
<li><p><strong>ms2_only</strong> (<em>bool</em>) – Whether to include MS1 data in the output files.</p></li>
<li><p><strong>exclude_mobility</strong> (<em>bool</em>) – Whether to include mobility data in the output files, defaults to None.</p></li>
<li><p><strong>profile_bins</strong> (<em>int</em>) – Number of bins to bin spectrum to.</p></li>
<li><p><strong>mz_encoding</strong> (<em>int</em>) – m/z encoding command line parameter, either “64” or “32”.</p></li>
<li><p><strong>intensity_encoding</strong> (<em>int</em>) – Intensity encoding command line parameter, either “64” or “32”.</p></li>
<li><p><strong>mobility_encoding</strong> (<em>int</em>) – Mobility encoding command line parameter, either “64” or “32”.</p></li>
<li><p><strong>compression</strong> (<em>str</em>) – Compression command line parameter, either “zlib” or “none”.</p></li>
<li><p><strong>maldi_output_file</strong> (<em>str</em>) – Determines whether all spectra from a given .d dataset are written to a single mzML file
(“combined”), written to individual mzML files (“individual”, i.e. one spectrum per file), or grouped to have
one mzML file per annotation/label/condition (“sample”, requires CSV plate_map to be specified).</p></li>
<li><p><strong>plate_map</strong> (<em>str</em>) – Path to the MALDI plate map in CSV format.</p></li>
<li><p><strong>barebones_metadata</strong> (<em>bool</em>) – If True, omit software and data processing metadata in the resulting mzML files. Used
for compatibility with downstream analysis software that does not have support for newer CV params or
UserParams.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="timsconvert.write.write_maldi_ims_chunk_to_imzml">
<span class="sig-prename descclassname"><span class="pre">timsconvert.write.</span></span><span class="sig-name descname"><span class="pre">write_maldi_ims_chunk_to_imzml</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">imzml_file</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">frame_start</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">frame_stop</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mode</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">exclude_mobility</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">profile_bins</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mz_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">intensity_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mobility_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">diapasef_window</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.write.write_maldi_ims_chunk_to_imzml" title="Link to this definition">¶</a></dt>
<dd><p>Parse and write out a group of spectra to an imzML file from a MALDI-MS(/MS) MSI dataset using pyimzML.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>data</strong> (<a class="reference internal" href="#timsconvert.classes.TimsconvertTdfData" title="timsconvert.classes.TimsconvertTdfData"><em>timsconvert.classes.TimsconvertTdfData</em></a><em> | </em><a class="reference internal" href="#timsconvert.classes.TimsconvertTsfData" title="timsconvert.classes.TimsconvertTsfData"><em>timsconvert.classes.TimsconvertTsfData</em></a>) – Object containing raw data information from TDF or TSF file.</p></li>
<li><p><strong>imzml_file</strong> (<em>pyimzml.ImzMLWriter.ImzMLWriter</em>) – Instance of pyimzml.ImzMLWriter.ImzMLWriter for output file.</p></li>
<li><p><strong>frame_start</strong> (<em>int</em>) – Beginning frame number.</p></li>
<li><p><strong>frame_stop</strong> (<em>int</em>) – Ending frame number (non-inclusive).</p></li>
<li><p><strong>mode</strong> (<em>str</em>) – Mode command line parameter, either “profile”, “centroid”, or “raw”.</p></li>
<li><p><strong>exclude_mobility</strong> (<em>bool</em>) – Whether to include mobility data in the output files, defaults to None.</p></li>
<li><p><strong>profile_bins</strong> (<em>int</em>) – Number of bins to bin spectrum to.</p></li>
<li><p><strong>mz_encoding</strong> (<em>int</em>) – m/z encoding command line parameter, either “64” or “32”.</p></li>
<li><p><strong>intensity_encoding</strong> (<em>int</em>) – Intensity encoding command line parameter, either “64” or “32”.</p></li>
<li><p><strong>mobility_encoding</strong> (<em>int</em>) – Mobility encoding command line parameter, either “64” or “32”.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="timsconvert.write.write_maldi_ims_imzml">
<span class="sig-prename descclassname"><span class="pre">timsconvert.write.</span></span><span class="sig-name descname"><span class="pre">write_maldi_ims_imzml</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">outdir</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">outfile</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mode</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">exclude_mobility</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">profile_bins</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">imzml_mode</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mz_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">intensity_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mobility_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">compression</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">chunk_size</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">10</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.write.write_maldi_ims_imzml" title="Link to this definition">¶</a></dt>
<dd><p>Parse and write out spectra to an imzML file from a MALDI-MS(/MS) MSI dataset using pyimzML.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>data</strong> (<a class="reference internal" href="#timsconvert.classes.TimsconvertTdfData" title="timsconvert.classes.TimsconvertTdfData"><em>timsconvert.classes.TimsconvertTdfData</em></a><em> | </em><a class="reference internal" href="#timsconvert.classes.TimsconvertTsfData" title="timsconvert.classes.TimsconvertTsfData"><em>timsconvert.classes.TimsconvertTsfData</em></a>) – Object containing raw data information from TDF or TSF file.</p></li>
<li><p><strong>outdir</strong> (<em>str</em>) – Output directory path that was specified from the command line parameters or the original input
file path if no output directory was specified.</p></li>
<li><p><strong>outfile</strong> (<em>str</em>) – The original input filename if no output filename was specified.</p></li>
<li><p><strong>mode</strong> (<em>str</em>) – Mode command line parameter, either “profile”, “centroid”, or “raw”.</p></li>
<li><p><strong>exclude_mobility</strong> (<em>bool</em>) – Whether to include mobility data in the output files, defaults to None.</p></li>
<li><p><strong>profile_bins</strong> (<em>int</em>) – Number of bins to bin spectrum to.</p></li>
<li><p><strong>imzml_mode</strong> (<em>str</em>) – Whether to export spectra in “processed” (individual m/z and intensity arrays per pixel) or
“continuous” mode (single m/z array for the entire dataset, individual intensity arrays per pixel).</p></li>
<li><p><strong>mz_encoding</strong> (<em>int</em>) – m/z encoding command line parameter, either “64” or “32”.</p></li>
<li><p><strong>intensity_encoding</strong> (<em>int</em>) – Intensity encoding command line parameter, either “64” or “32”.</p></li>
<li><p><strong>mobility_encoding</strong> (<em>int</em>) – Mobility encoding command line parameter, either “64” or “32”.</p></li>
<li><p><strong>compression</strong> (<em>str</em>) – Compression command line parameter, either “zlib” or “none”.</p></li>
<li><p><strong>chunk_size</strong> (<em>int</em>) – Number of MS1 spectra that to be used when subsetting dataset into smaller groups to pass onto
timsconvert.write.write_lcms_chunk_to_mzml() for memory efficiency; larger chunk_size requires more memory
during conversion.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="timsconvert.write.write_maldi_ims_iprm_imzml">
<span class="sig-prename descclassname"><span class="pre">timsconvert.write.</span></span><span class="sig-name descname"><span class="pre">write_maldi_ims_iprm_imzml</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">outdir</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">outfile</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mode</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">exclude_mobility</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">profile_bins</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">imzml_mode</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mz_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">intensity_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mobility_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">compression</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">chunk_size</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">10</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.write.write_maldi_ims_iprm_imzml" title="Link to this definition">¶</a></dt>
<dd><p>Parse and write out spectra to an imzML file from a MALDI-MS(/MS) MSI dataset using pyimzML.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>data</strong> (<a class="reference internal" href="#timsconvert.classes.TimsconvertTdfData" title="timsconvert.classes.TimsconvertTdfData"><em>timsconvert.classes.TimsconvertTdfData</em></a><em> | </em><a class="reference internal" href="#timsconvert.classes.TimsconvertTsfData" title="timsconvert.classes.TimsconvertTsfData"><em>timsconvert.classes.TimsconvertTsfData</em></a>) – Object containing raw data information from TDF or TSF file.</p></li>
<li><p><strong>outdir</strong> (<em>str</em>) – Output directory path that was specified from the command line parameters or the original input
file path if no output directory was specified.</p></li>
<li><p><strong>outfile</strong> (<em>str</em>) – The original input filename if no output filename was specified.</p></li>
<li><p><strong>mode</strong> (<em>str</em>) – Mode command line parameter, either “profile”, “centroid”, or “raw”.</p></li>
<li><p><strong>exclude_mobility</strong> (<em>bool</em>) – Whether to include mobility data in the output files, defaults to None.</p></li>
<li><p><strong>profile_bins</strong> (<em>int</em>) – Number of bins to bin spectrum to.</p></li>
<li><p><strong>imzml_mode</strong> (<em>str</em>) – Whether to export spectra in “processed” (individual m/z and intensity arrays per pixel) or
“continuous” mode (single m/z array for the entire dataset, individual intensity arrays per pixel).</p></li>
<li><p><strong>mz_encoding</strong> (<em>int</em>) – m/z encoding command line parameter, either “64” or “32”.</p></li>
<li><p><strong>intensity_encoding</strong> (<em>int</em>) – Intensity encoding command line parameter, either “64” or “32”.</p></li>
<li><p><strong>mobility_encoding</strong> (<em>int</em>) – Mobility encoding command line parameter, either “64” or “32”.</p></li>
<li><p><strong>compression</strong> (<em>str</em>) – Compression command line parameter, either “zlib” or “none”.</p></li>
<li><p><strong>chunk_size</strong> (<em>int</em>) – Number of MS1 spectra that to be used when subsetting dataset into smaller groups to pass onto
timsconvert.write.write_lcms_chunk_to_mzml() for memory efficiency; larger chunk_size requires more memory
during conversion.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="timsconvert.write.write_ms1_spectrum">
<span class="sig-prename descclassname"><span class="pre">timsconvert.write.</span></span><span class="sig-name descname"><span class="pre">write_ms1_spectrum</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">writer</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">scan</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mz_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">intensity_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mobility_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">compression</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">title</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.write.write_ms1_spectrum" title="Link to this definition">¶</a></dt>
<dd><p>Write an MS1 spectrum to an mzML file using psims.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>writer</strong> (<em>psims.mzml.MzMLWriter</em>) – Instance of psims.mzml.MzMLWriter for output file.</p></li>
<li><p><strong>data</strong> (<a class="reference internal" href="#timsconvert.classes.TimsconvertTdfData" title="timsconvert.classes.TimsconvertTdfData"><em>timsconvert.classes.TimsconvertTdfData</em></a><em> | </em><a class="reference internal" href="#timsconvert.classes.TimsconvertTsfData" title="timsconvert.classes.TimsconvertTsfData"><em>timsconvert.classes.TimsconvertTsfData</em></a><em> |
</em><a class="reference internal" href="#timsconvert.classes.TimsconvertBafData" title="timsconvert.classes.TimsconvertBafData"><em>timsconvert.classes.TimsconvertBafData</em></a>) – Object containing raw data information from TDF, TSF, or BAF file.</p></li>
<li><p><strong>scan</strong> (<em>pyBaf2Sql.classes.BafSpectrum</em><em> | </em><em>pyTDFSDK.classes.TsfSpectrum</em><em> | </em><em>pyTDFSDK.classes.TdfSpectrum</em>) – Object containing spectrum metadata and data arrays.</p></li>
<li><p><strong>mz_encoding</strong> (<em>int</em>) – m/z encoding command line parameter, either “64” or “32”.</p></li>
<li><p><strong>intensity_encoding</strong> (<em>int</em>) – Intensity encoding command line parameter, either “64” or “32”.</p></li>
<li><p><strong>mobility_encoding</strong> (<em>int</em>) – Mobility encoding command line parameter, either “64” or “32”.</p></li>
<li><p><strong>compression</strong> (<em>str</em>) – Compression command line parameter, either “zlib” or “none”.</p></li>
<li><p><strong>title</strong> (<em>str</em><em> | </em><em>None</em>) – Spectrum title to be used for MALDI data, defaults to None.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="timsconvert.write.write_ms2_spectrum">
<span class="sig-prename descclassname"><span class="pre">timsconvert.write.</span></span><span class="sig-name descname"><span class="pre">write_ms2_spectrum</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">writer</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">scan</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mz_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">intensity_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mobility_encoding</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">compression</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">parent_scan</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">title</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.write.write_ms2_spectrum" title="Link to this definition">¶</a></dt>
<dd><p>Write an MS/MS spectrum to an mzML file using psims.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>writer</strong> (<em>psims.mzml.MzMLWriter</em>) – Instance of psims.mzml.MzMLWriter for output file.</p></li>
<li><p><strong>data</strong> (<a class="reference internal" href="#timsconvert.classes.TimsconvertTdfData" title="timsconvert.classes.TimsconvertTdfData"><em>timsconvert.classes.TimsconvertTdfData</em></a><em> | </em><a class="reference internal" href="#timsconvert.classes.TimsconvertTsfData" title="timsconvert.classes.TimsconvertTsfData"><em>timsconvert.classes.TimsconvertTsfData</em></a><em> |
</em><a class="reference internal" href="#timsconvert.classes.TimsconvertBafData" title="timsconvert.classes.TimsconvertBafData"><em>timsconvert.classes.TimsconvertBafData</em></a>) – Object containing raw data information from TDF, TSF, or BAF file.</p></li>
<li><p><strong>scan</strong> (<em>pyBaf2Sql.classes.BafSpectrum</em><em> | </em><em>pyTDFSDK.classes.TsfSpectrum</em><em> | </em><em>pyTDFSDK.classes.TdfSpectrum</em>) – Object containing spectrum metadata and data arrays.</p></li>
<li><p><strong>mz_encoding</strong> (<em>int</em>) – m/z encoding command line parameter, either “64” or “32”.</p></li>
<li><p><strong>intensity_encoding</strong> (<em>int</em>) – Intensity encoding command line parameter, either “64” or “32”.</p></li>
<li><p><strong>mobility_encoding</strong> (<em>int</em>) – Mobility encoding command line parameter, either “64” or “32”.</p></li>
<li><p><strong>compression</strong> (<em>str</em>) – Compression command line parameter, either “zlib” or “none”.</p></li>
<li><p><strong>parent_scan</strong> (<em>pyBaf2Sql.classes.BafSpectrum</em><em> | </em><em>pyTDFSDK.classes.TsfSpectrum</em><em> | </em><em>pyTDFSDK.classes.TdfSpectrum</em>) – Object containing standard spectrum data for parent scan used to link MS/MS spectrum with
an MS1 spectrum.</p></li>
<li><p><strong>title</strong> (<em>str</em><em> | </em><em>None</em>) – Spectrum title to be used for MALDI data, defaults to None.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="timsconvert.write.write_mzml_metadata">
<span class="sig-prename descclassname"><span class="pre">timsconvert.write.</span></span><span class="sig-name descname"><span class="pre">write_mzml_metadata</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">writer</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">infile</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mode</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ms2_only</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">barebones_metadata</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#timsconvert.write.write_mzml_metadata" title="Link to this definition">¶</a></dt>
<dd><p>Write metadata to mzML file using psims. Includes spectral metadata, source files, software list, instrument
configuration, and data processing. Note that TIMSCONVERT is not included as a data processing step due to a lack
CV param and compatibility with downstream data analysis software.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>data</strong> (<a class="reference internal" href="#timsconvert.classes.TimsconvertTdfData" title="timsconvert.classes.TimsconvertTdfData"><em>timsconvert.classes.TimsconvertTdfData</em></a><em> | </em><a class="reference internal" href="#timsconvert.classes.TimsconvertTsfData" title="timsconvert.classes.TimsconvertTsfData"><em>timsconvert.classes.TimsconvertTsfData</em></a><em> |
</em><a class="reference internal" href="#timsconvert.classes.TimsconvertBafData" title="timsconvert.classes.TimsconvertBafData"><em>timsconvert.classes.TimsconvertBafData</em></a>) – Object containing raw data information from TDF, TSF, or BAF file.</p></li>
<li><p><strong>writer</strong> (<em>psims.mzml.MzMLWriter</em>) – Instance of psims.mzml.MzMLWriter for output file.</p></li>
<li><p><strong>infile</strong> (<em>str</em>) – Input file path to be used for source file metadata.</p></li>
<li><p><strong>mode</strong> (<em>str</em>) – Mode command line parameter, either “profile”, “centroid”, or “raw”.</p></li>
<li><p><strong>ms2_only</strong> (<em>bool</em>) – Whether to include MS1 data in the output files.</p></li>
<li><p><strong>barebones_metadata</strong> (<em>bool</em>) – If True, omit software and data processing metadata in the resulting mzML files. Used
for compatibility with downstream analysis software that does not have support for newer CV params or
UserParams.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

</section>
<section id="module-timsconvert">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-timsconvert" title="Link to this heading">¶</a></h2>
</section>
</section>


          </div>
          
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="Main">
        <div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="index.html">TIMSCONVERT</a></h1>









<search id="searchbox" style="display: none" role="search">
    <div class="searchformwrapper">
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder="Search"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script><h3>Navigation</h3>
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="introduction.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="local.html">GUI Usage</a></li>
<li class="toctree-l1"><a class="reference internal" href="local.html#command-line-usage">Command Line Usage</a></li>
<li class="toctree-l1"><a class="reference internal" href="advanced.html">Advanced Usage</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">TIMSCONVERT Source Code</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="#module-timsconvert.arguments">timsconvert.arguments module</a></li>
<li class="toctree-l2"><a class="reference internal" href="#module-timsconvert.classes">timsconvert.classes module</a></li>
<li class="toctree-l2"><a class="reference internal" href="#module-timsconvert.constants">timsconvert.constants module</a></li>
<li class="toctree-l2"><a class="reference internal" href="#module-timsconvert.convert">timsconvert.convert module</a></li>
<li class="toctree-l2"><a class="reference internal" href="#module-timsconvert.data_input">timsconvert.data_input module</a></li>
<li class="toctree-l2"><a class="reference internal" href="#module-timsconvert.parse">timsconvert.parse module</a></li>
<li class="toctree-l2"><a class="reference internal" href="#module-timsconvert.timestamp">timsconvert.timestamp module</a></li>
<li class="toctree-l2"><a class="reference internal" href="#module-timsconvert.timsconvert_gui_template">timsconvert.timsconvert_gui_template module</a></li>
<li class="toctree-l2"><a class="reference internal" href="#module-timsconvert.write">timsconvert.write module</a></li>
<li class="toctree-l2"><a class="reference internal" href="#module-timsconvert">Module contents</a></li>
</ul>
</li>
<li class="toctree-l1 current"><a class="reference internal" href="modules.html">Modules</a><ul class="current">
<li class="toctree-l2 current"><a class="current reference internal" href="#">timsconvert package</a></li>
</ul>
</li>
</ul>

<div class="relations">
<h3>Related Topics</h3>
<ul>
  <li><a href="index.html">Documentation overview</a><ul>
      <li>Previous: <a href="advanced.html" title="previous chapter">Advanced Usage</a></li>
      <li>Next: <a href="modules.html" title="next chapter">timsconvert</a></li>
  </ul></li>
</ul>
</div>








        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="footer">
      &#169;2021-2024, Gordon T. Luu.
      
      |
      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 8.0.2</a>
      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 1.0.0</a>
      
      |
      <a href="_sources/timsconvert.rst.txt"
          rel="nofollow">Page source</a>
    </div>

    

    
  </body>
</html>